﻿using System.Windows.Media;

namespace DCT.View
{
    public class SignalView : DeviceBaseView
    {
        #region Constructor

        public SignalView()
            : base()
        {
        }
                     
        #endregion // Constructor

        #region Fields

        //SignalViewModel _sgViewModel;
        static Drawing _signalDrawing;

        #endregion // Fields

        #region Properties

        protected override Drawing visualDrawing
        {
            get
            {
                return _signalDrawing;
            }
            set
            {
                _signalDrawing = value;
            }
        }

        #endregion // Properties

        #region Methods

        //public override void UpdateVisual()
        //{
        //    base.UpdateVisual();

        //    XmlReader xmlReader = XmlReader.Create(@"DeviceGraph\Signal.xml");
        //    Drawing VisualObject = (Drawing)XamlReader.Load(xmlReader);

        //    DrawingVisual drawingVisual = new DrawingVisual();
        //    DrawingContext drawingContext = drawingVisual.RenderOpen();
        //    drawingContext.DrawDrawing(VisualObject);
        //    drawingContext.Close();

        //    _deviceVisual.Children.Add(drawingVisual);
        //}

        //protected override void DeviceView_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
        //{
        //    base.DeviceView_DataContextChanged(sender, e);

        //    if (e.NewValue is SignalViewModel)
        //    {
        //        _sgViewModel = e.NewValue as SignalViewModel;
        //    }           
        //}

        #endregion // Methods
    }
}
